import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { PasswordResetComponent } from './password-reset/password-reset.component';

const routes: Routes = [
    {
        path: '',
        children: [
            {
                path: '',
                redirectTo: 'login',
            },
            {
                path: 'login',
                component: LoginComponent,
                data: {
                    title: '登录',
                    translate: 'pages.login'
                }
            },
            {
                path: 'password/reset',
                component: PasswordResetComponent,
                data: {
                    title: '重置密码',
                    translate: 'pages.password.reset'
                }
            },
            {
                path: '**',
                redirectTo: 'login'
            }
        ]
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
  })
  export class PagesRoutingModule {}
